﻿
/****** Object:  Table [dbo].[HouseSitter]    Script Date: 6/29/2013 8:40:46 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[HouseSitter](
	[HouseSitterId] [int] IDENTITY(1,1) NOT NULL,
	[IsCouple] [bit] NOT NULL,
	[SelfDescription] [nvarchar](max) NULL,
	[LikesDogs] [bit] NULL,
	[LikesCats] [bit] NULL,
	[Children] [int] NULL,
	[HouseTypePreference] [nvarchar](250) NULL,
	[LocationPreference] [nvarchar](500) NOT NULL,
	[ContactInfoId] [int] NOT NULL,
	[IsWoman] [bit] NOT NULL,
	[BirthDate] [date] NOT NULL,
	[UserId] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_HouseSitter] PRIMARY KEY CLUSTERED 
(
	[HouseSitterId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

ALTER TABLE [dbo].[HouseSitter]  WITH CHECK ADD  CONSTRAINT [FK_HouseSitter_ContactInfo] FOREIGN KEY([HouseSitterId])
REFERENCES [dbo].[ContactInfo] ([ContactInfoId])
GO

ALTER TABLE [dbo].[HouseSitter] CHECK CONSTRAINT [FK_HouseSitter_ContactInfo]
GO

ALTER TABLE [dbo].[HouseSitter]  WITH CHECK ADD  CONSTRAINT [FK_HouseSitter_Users] FOREIGN KEY([UserId])
REFERENCES [dbo].[aspnet_Users] ([UserId])
GO

ALTER TABLE [dbo].[HouseSitter] CHECK CONSTRAINT [FK_HouseSitter_Users]
GO

